import * as actionType from '../actions/actionType'
const initState={
    isLogin:false,
    checkAuthIsComplete:false
};

export  default (state=initState,action)=>{
    switch (action.type) {
        case actionType.LOGIN_STATUS_TRUE:
            return{
                ...state,
                isLogin:true
            };
        case actionType.LOGIN_STATUS_FALSE:
            return{
                ...state,
                isLogin:false
            };
        case actionType.CHECK_AUTH_COMPLETED:
            return{
                ...state,
                checkAuthIsComplete:true
            }
        default:
            return state
    }
}